window.onload = function () {
    var h = document.querySelector('#h')
    var m = document.querySelector('#m')
    var s = document.querySelector('#s')
    function d(date) {
    var t = new Date();
    var d = new Date(date);
    var end = d.getTime() - t.getTime();
    var hour = Math.floor(end/1000/60/60%24);
    var min = Math.floor(end/1000/60%60);
    var se = Math.floor(end/1000%60);
    if(hour <= 0 && min <= 0 && se <=0) {
        clearInterval(time);
    }
    if(hour < 10) {
        hour = '0' + hour;
    }
    if(min < 10) {
        min = '0' + min;
    }
    if(se < 10) {
        se = '0' + se;
    }
    h.innerHTML = hour;
    m.innerHTML = min;
    s.innerHTML = se;
}

    var time = setInterval(function () {
        d('2021/6/6 15:6:25')

    },1000)
}